Uitwisselprofiel RIVM Infectieziektenbestrijding

Over Uitwisselprofiel RIVM Infectieziektenbestrijding


Publicatiedatum:
08-09-2026

Inwerkingtreding:
09-09-2026

2.2 Wat is het aantal cliënten per wet?

Concepten

Relaties

Eigenschappen

SPARQL query

Code gekopieerd

...

Kopieer naar klembord

1# Indicator: RIVM Infectieziektenbestrijding 2.2
2# Canonical id: MONO-0007 - "Aantal cliënten per wet"
3# Parameters: ?peildatum
4# Ontologie: versie 3.0.0 of nieuwer
5
6PREFIX onz-g: <http://purl.org/ozo/onz-g#>
7PREFIX onz-zorg: <http://purl.org/ozo/onz-zorg#>
8PREFIX onz-org: <http://purl.org/ozo/onz-org#>
9PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
10PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
11PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
12
13SELECT
14(?vestiging AS ?Indeling)
15(COUNT(DISTINCT IF(BOUND(?wlz), ?client, ?unbound)) AS ?Aantal_Wlz)
16(COUNT(DISTINCT IF(BOUND(?zvw), ?client, ?unbound)) AS ?Aantal_Zvw)
17(COUNT(DISTINCT IF(BOUND(?wmo) || BOUND(?forensisch), ?client, ?unbound)) AS ?Aantal_overig)
18WHERE {
19    {
20        # Per vestiging
21        SELECT ?client ?wlz ?zvw ?wmo ?forensisch ?vestiging
22        WHERE {
23            # peildatum: maandag van de week
24            # BIND("2024-01-01"^^xsd:date AS ?peildatum)
25
26            BIND(?peildatum AS ?startperiode)
27            BIND(?startperiode + "P6D"^^xsd:duration AS ?eindperiode)
28
29            {
30                ?indicatie a onz-zorg:IndicatieBesluit
31            } UNION {
32                ?indicatie a onz-zorg:ForensischeIndicatieStelling
33            }
34
35            ?indicatie # hier
36            onz-g:isAbout ?client ;
37            onz-g:startDatum ?start_indicatie .
38            ?client a onz-g:Human .
39            OPTIONAL { ?indicatie onz-g:eindDatum ?eind_indicatie . }
40
41            FILTER (
42            ?start_indicatie <= ?eindperiode &&
43            (!BOUND(?eind_indicatie) || ?eind_indicatie >= ?startperiode)
44            ) # tot hier: potentieel BB?
45
46            OPTIONAL {
47                ?indicatie a onz-zorg:WlzIndicatie .
48                BIND(1 AS ?wlz)
49            }
50            OPTIONAL {
51                ?indicatie a onz-zorg:ZvwIndicatie .
52                BIND(1 AS ?zvw)
53            }
54            OPTIONAL {
55                ?indicatie a onz-zorg:WmoIndicatie .
56                BIND(1 AS ?wmo)
57            }
58            OPTIONAL {
59                ?indicatie a onz-zorg:ForensischeIndicatieStelling .
60                BIND(1 AS ?forensisch)
61            }
62
63            ?zorgproces
64            onz-g:definedBy ?indicatie ;
65            onz-g:hasPerdurantLocation ?locatie .
66
67            OPTIONAL { ?zorgproces onz-g:eindDatum ?eind_zorgproces . }
68
69            FILTER (
70            !BOUND(?eind_zorgproces) ||
71            ?eind_zorgproces >= ?startperiode
72            )
73
74            ?locatie onz-g:partOf* ?vestiging_uri .
75            ?vestiging_uri a onz-org:Vestiging ;
76            onz-g:identifiedBy ?vest_nr .
77            ?vest_nr a onz-org:Vestigingsnummer ;
78            onz-g:hasDataValue ?vestiging .
79        }
80    }
81    UNION
82    {
83        # Totaal organisatie
84        SELECT ?client ?wlz ?zvw ?wmo ?forensisch ("Totaal organisatie" AS ?vestiging)
85        WHERE {
86            # BIND("2024-01-01"^^xsd:date AS ?peildatum)
87
88            BIND(?peildatum AS ?startperiode)
89            BIND(?startperiode + "P6D"^^xsd:duration AS ?eindperiode)
90
91            {
92                ?indicatie a onz-zorg:IndicatieBesluit
93            } UNION {
94                ?indicatie a onz-zorg:ForensischeIndicatieStelling
95            }
96
97            ?indicatie
98            onz-g:isAbout ?client ;
99            onz-g:startDatum ?start_indicatie .
100            ?client a onz-g:Human .
101            OPTIONAL { ?indicatie onz-g:eindDatum ?eind_indicatie . }
102
103            FILTER (
104            ?start_indicatie <= ?eindperiode &&
105            (!BOUND(?eind_indicatie) || ?eind_indicatie >= ?startperiode)
106            )
107
108            OPTIONAL {
109                ?indicatie a onz-zorg:WlzIndicatie .
110                BIND(1 AS ?wlz)
111            }
112            OPTIONAL {
113                ?indicatie a onz-zorg:ZvwIndicatie .
114                BIND(1 AS ?zvw)
115            }
116            OPTIONAL {
117                ?indicatie a onz-zorg:WmoIndicatie .
118                BIND(1 AS ?wmo)
119            }
120            OPTIONAL {
121                ?indicatie a onz-zorg:ForensischeIndicatieStelling .
122                BIND(1 AS ?forensisch)
123            }
124
125            ?zorgproces
126            onz-g:definedBy ?indicatie ;
127            onz-g:hasPerdurantLocation ?locatie .
128
129            OPTIONAL { ?zorgproces onz-g:eindDatum ?eind_zorgproces . }
130
131            FILTER (
132            !BOUND(?eind_zorgproces) ||
133            ?eind_zorgproces >= ?startperiode
134            )
135        }
136    }
137}
138GROUP BY ?vestiging
139ORDER BY ?vestiging
140